<template>
	<view class="center animated jackInTheBox">
		<text class="author">{{author}}</text>
			<image :src="src" mode="aspectFill" style="width: 100%;" class="img"></image>
		<text class="content">{{content}}</text>
		<text>图片来源</text>
		<scroll-view scroll-x="">{{src}}</scroll-view>
	</view>
</template>

<script>
	import a from '../js/request.js';
	var http =new a;
	export default {
		data() {
			return {
				author:'',
				src:"",
				content:"",
				api:{
					url:'https://v1.alapi.cn/api/mingyan'
				}
			};
		},
		methods:
		{
			loadinfo()
			{
				http.request(this.api).then((e)=>
					{
						this.author=e.data.data.author
						this.content=e.data.data.content
					})
			}
		},
		onLoad(option) {
			this.src=option.src
			this.loadinfo()
		}
		}
</script>

<style lang="less">
.center
{	
	display: flex;
	flex-direction: column ;
	text
	{
		border-bottom: 28px;
	}
	text-align: center;
	.author{
		font-size: 24px;
		
	}
	.content{
		font-size: 20px;
		letter-spacing: 4px;
	}
	.img
	{
		border-radius: 20px;
	}
}
</style>
